const HTTP = require('../../models/base')

Page({

  data: {

    movies: {},

    x: true,

    urls: ""

  },

  onLoad: async function (options) {

    var {
      id
    } = options

    console.log(id)

    var res = await HTTP.getDetail(id);

    this.setData({

      movies: res.data

    })


  },

  handleImage(event) {

    var picUrl = event.currentTarget.dataset.url
    this.setData({
      picUrl
    })

    console.log(event.currentTarget.dataset.url)

    wx.previewImage({

      current: picUrl, // 当前显示图片的链接，不填则默认为 urls 的第一张
      urls: [picUrl]
    })

  }

})